var path = require("path");
var fs = require("fs");
//创建多层文件夹
module.exports = function (distpath) {
    var _distlist = path.dirname(distpath).split("/");
    var _dispath = ""
    _distlist.map((dir,index)=>{
        var slash = "\\"
        if(index==_distlist.length-1){
            slash = ""
        }
        _dispath = _dispath + dir+slash

        if(!fs.existsSync(_dispath)){
            fs.mkdirSync(_dispath)
        }
    })
}